<template>
  <el-form label-width="100px" class="exhibition-from">
    <el-form-item v-if="userInfo.departmentName" label="部门">{{userInfo.departmentName}}</el-form-item>
    <el-form-item v-else label="企业名称">{{userInfo.companyName}}</el-form-item>
    <el-form-item v-if="userInfo.departmentName" label="姓名">{{userInfo.name}}</el-form-item>
    <el-form-item v-else label="企业管理员">{{userInfo.name}}</el-form-item>
  </el-form>
</template>
<script>
export default {
  name: 'user-info',
  props: ['userInfo']
}
</script>
<style lang="scss" scoped>
.exhibition-from {
  .el-form-item {
    margin-bottom: 0;
  }
}
</style>
